import type {
  Banner,
  Category,
  GuessItem,
  HotItem,
} from '@/types/home'
import { http } from '@/utils/http'
import type { PageParams, PageResult } from '@/types/global'
// 首页-广告区域-小程序
export const homeBannerApi = (distributionSite = 1) => {
  return http<Banner[]>({
    method: 'GET',
    url: '/home/banner',
    data: { distributionSite },
  })
}
//首页-前台分类-小程序
export const homeCategoryMutliApi = () => {
  return http<Category[]>({
    method: 'GET',
    url: '/home/category/mutli',
  })
}
// 首页-热门推荐-小程序
export const homeHotMutliApi = () => {
  return http<HotItem[]>({
    method: 'GET',
    url: '/home/hot/mutli',
  })
}
//猜你喜欢
export const homeGoodsGuessLikeApi = (data: PageParams) => {
  return http<PageResult<GuessItem>>({
    method: 'GET',
    url: '/home/goods/guessLike',
    data
  })
}
